package com.xmy.study.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 任务表
 * </p>
 *
 * @author hpiggy
 * @since 2024-03-18
 */
@Data
@TableName("edu_task")
@ApiModel(value = "Task对象", description = "任务表")
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ApiModelProperty("班型")
    private Long classTypeId;

    @ApiModelProperty("版本id")
    private Long courseVersionId;

    @ApiModelProperty("任务日期")
    private LocalDate taskDate;

    @ApiModelProperty("学习到的课次(第几次课)")
    private Integer taskCourseNum;

    @ApiModelProperty("最低学习关数(关数为数字)")
    private Integer lowestShutnum;

    @ApiModelProperty("突破目标关数")
    private Integer breakShutnum;

    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @ApiModelProperty("班型")
    @TableField(exist = false)
    private String classTypeStr;

    @ApiModelProperty("版本名称")
    @TableField(exist = false)
    private String courseVersionStr;

}
